   package cn.com.generaldata.jsme_indicator_system.vo.reportdesigner;

import java.util.Map;

import org.apache.commons.lang3.builder.ToStringBuilder;

import com.google.common.collect.ImmutableMap;

/**
 * 报表设计器单元格式基础对象
 */
public abstract class ReportCell {

	/** 报表设计单元格类型 */
	public static final String CELL_TYPE_STATIC = "static";
	public static final String CELL_TYPE_INPUT = "input";
	public static final String CELL_TYPE_NONE = "none";

	private int rowid;

	private int colid;

	private String type;

	private String content;

	private int rowSpan;

	private int colSpan;
	

	private ReportCellStyle cellStyle;
	
	private ReportCellStyle style;

	private int indentlevel;

	private int inputType = 1;
	
	
	public ReportCellStyle getCellStyle() {
		return cellStyle;
	}

	public void setCellStyle(ReportCellStyle cellStyle) {
		this.cellStyle = cellStyle;
	}





	// 输入项目id
	private Integer inputid;

	//private Map<String, String> style = ImmutableMap.of();

	public int getRowid() {
		return rowid;
	}

	public void setRowid(int rowid) {
		this.rowid = rowid;
	}

	public int getColid() {
		return colid;
	}

	public void setColid(int colid) {
		this.colid = colid;
	}

	public String getType() {
		return type;
	}

	public void setType(String type) {
		this.type = type;
	}

	public String getContent() {
		return content;
	}

	public void setContent(String content) {
		this.content = content;
	}

	public int getRowSpan() {
		return rowSpan;
	}

	public void setRowSpan(int rowSpan) {
		this.rowSpan = rowSpan;
	}

	public int getColSpan() {
		return colSpan;
	}

	public void setColSpan(int colSpan) {
		this.colSpan = colSpan;
	}

	public ReportCellStyle getStyle() {
		return style;
	}

	public void setStyle(ReportCellStyle style) {
		this.style = style;
	}

	public int getIndentlevel() {
		return indentlevel;
	}

	public void setIndentlevel(int indentlevel) {
		this.indentlevel = indentlevel;
	}
	public Integer getInputid() {
		return inputid;
	}

	public void setInputid(Integer inputid) {
		this.inputid = inputid;
	}
	public int getInputType() {
		return inputType;
	}

	public void setInputType(int inputType) {
		this.inputType = inputType;
	}


	@Override
	public String toString() {
		return ToStringBuilder.reflectionToString(this);
	}

	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + colid;
		result = prime * result + rowid;
		return result;
	}

	@Override
	public boolean equals(Object obj) {
		if (this == obj) {
			return true;
		}
		if (obj == null) {
			return false;
		}
		if (getClass() != obj.getClass()) {
			return false;
		}
		ReportCell other = (ReportCell) obj;
		if (colid != other.colid) {
			return false;
		}
		if (rowid != other.rowid) {
			return false;
		}
		return true;
	}

}
